 <?php echo $this->load->view('_elements/registratednavigation'); ?>

<div id="content">
    <div id="centerbar">
        <?php if(empty($message_error)):?>
        <div class="titlered"><?php echo $Title ?> - <span id="showedrefferal"><?php echo $refInfo['ur_id'];?></span></div>
        <div id="tableblock" class="blockstyle">
            <table id="requestable">
                <thead>
                    <tr>
                        <th><?php echo $this->user_model->fields['referral_no']?></th>
                        <th><?php echo $this->user_model->fields['ref_status']?></th>
                        <th><?php echo $this->user_model->fields['ref_date_posted']?></th>
                        <th><?php echo $this->user_model->fields['ref_end_date']?></th>
                        <th><?php echo $this->user_model->fields['ref_abstract']?></th>
                        <th><?php echo $this->user_model->fields['ref_ask']?></th>
                        <th><?php echo $this->user_model->fields['ref_bids']?></th>
                        <th><?php echo $this->user_model->fields['ref_avg_bid']?></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><?php echo $refInfo['ur_id']?></td>
                        <td><?php echo $status?></td>
                        <td><?php echo $refInfo['ur_date_posted']?></td>
                        <td><?php echo $refInfo['ur_end_date']?></td>
                        <td><?php echo $refInfo['ur_abstract']?></td>
                        <td><?php echo $refInfo['ur_ask_price']?></td>
                        <td><?php echo $refInfo['ur_bid_num']?></td>
                        <td><?php echo $refInfo['ur_bid_avg']?></td>
                    </tr>
                </tbody>
            </table>
            <div style="height:15px;"></div>
            <div class="titlered"><?php echo $Title2?> - <span id="bid_ID"><?php echo $bidInfo['ub_ID'];?></span></div>
            <table id="bidstable">
                   <thead>
                       <tr>
                            <th><?php echo $this->user_model->fields['bid_no']?></th>
                            <th><?php echo $this->user_model->fields['bid_date']?></th>
                            <th><?php echo $this->user_model->fields['member_id']?></th>
                            <th><?php echo $this->user_model->fields['response_ex']?></th>
                            <th><?php echo $this->user_model->fields['bid_price']?></th>
                        </tr>
                   </thead>
                   <tbody>
                        <tr>
                            <td><?php echo anchor('/user/bidoptions/'.$bidInfo['ub_ID'], $bidInfo['ub_ID']) ?></td>
                            <td><?php echo $bidInfo['ub_date']?></td>
                            <td><?php echo 'M'.$bidInfo['ub_user_ID']?></td>
                            <td><?php echo $bidInfo['ub_response']?></td>
                            <td><?php echo $bidInfo['ub_price']?></td>
                        </tr>;
                   </tbody>
               </table>

            <div id="conect_bidder" class="bluebuttonstyle <?=($status=="Open")?"":"unavailable"?>"><?=($status=="Open")?anchor('/user/connect_with_bidder/'.$refInfo['ur_id'].'/'.$bidInfo['ub_ID'], 'Connect with Bidder'):"Connect with Bidder"?></div>
            <div id="accept_bid" class="bluebuttonstyle <?=($status=="Connect")?"":"unavailable"?>"><?=($status=="Connect")?anchor('/user/accept_bid/'.$refInfo['ur_id'].'/'.$bidInfo['ub_ID'], 'Accept Bid'):"Accept Bid";?></div>

            <div class="redsimpletext ps"><?php echo $postscript ?></div>
        </div>
        <?php else:?>
            <?php echo $message_error?>
        <?php endif;?>

    </div>

<?php echo $this->load->view('_elements/Followrefs'); ?>
</div>
